import React, { Component } from "react"
import { StatusBar, View } from "react-native"
import Toast from "../../components/toast/Toast"
import { color } from "../../theme"

export default class BaseScreen extends Component {
  toast: any
  render() {
    return (
      <View style={{ flex: 1 }}>
        <StatusBar
          hidden={false}
          barStyle={"light-content"}
          translucent={true}
          backgroundColor={color.transparent}
        />
        {this.superRender()}
        {this.renderLoading()}
        <Toast
          ref={r => {
            this.toast = r
          }}
        />
      </View>
    )
  }

  renderLoading = () => {}

  showToast = message => {
    this.toast.show(message)
  }

  superRender() {}
}
